package com.hspedu.bot.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Bot {
    /**
     * `id` int NOT NULL AUTO_INCREMENT,
     * `user_id` int NOT NULL,
     * `title` varchar(100) NULL,
     * `description` varchar(300) NULL,
     * `content` varchar(10000) NULL,
     * `rating` int NULL DEFAULT 1500,
     * `createtime` datetime NULL,
     * `modifytime` datetime NULL,
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer userId;
    private String title;
    private String description;
    private String content;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date modifytime;
}
